package engine.game.creature.states 
{
	import engine.game.creature.Creature;
	import flash.errors.IllegalOperationError;
	
	/**
	 * This is the base class for all creature states. It contains the methods
	 * that the creature class will wrap, to perform contextual logic.
	 * @author Jon Smelquist
	 */
	public class ICreatureState 
	{
		protected var _creature:Creature;
		
		public function ICreatureState(creature:Creature) 
		{
			_creature = creature;
		}
		
		/**
		* This function is the main update function that gets called every time the processTick
		* function calculates that it is time. In this function we perform any animation counting
		* or logic that needs to be executed for the respective state.
		**/
		public function update():void
		{
			throw new IllegalOperationError("Abstract class method not implemented!");
		}
		
		/**
		* This function will perform the required logic to stop the creature and return to a base
		* state of just standing. Note: A StandingState for example would execute no logic here
		* since the player is already standing.
		**/
		public function stand():void
		{
			throw new IllegalOperationError("Abstract class method not implemented!");
		}
		
		/**
		* This function performs the logic to decide a direction and initiate a walk in that
		* direction. Note: A CreepingState for example would execute no logic here since
		* the creature is already creeping.
		**/
		public function creep():void
		{
			throw new IllegalOperationError("Abstract class method not implemented!");
		}
	}
	
}